<div>
    <div class="meta-section">
        <div class="meta-section-header">
            <h4 class="meta-section-header-title">控制面板</h4>
        </div>
        <div class="meta-section-container">
            <uib-tabset>
                <uib-tab heading="操作">
                    <div class="meta-secondary-section">
                        <div class="meta-secondary-section-header">
                            <i class="fa fa-user"></i><span>委派操作</span>
                            <p class="meta-status meta-adjust-status" ng-class="{
                              'meta-online-status': editCtrl.data.isAssigned,
                              'meta-offline-status': !editCtrl.data.isAssigned}">
                                {{editCtrl.data.isAssigned?'已委派':'未委派'}}
                            </p>
                        </div>
                        <div class="meta-secondary-section-content">
                            <div class="meta-input-section">
                                <span class="meta-input-section-title">项目经理: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-input">
                                        <ui-select ng-model="editCtrl.manager" theme="bootstrap">
                                            <ui-select-match class="ui-select-match" placeholder="选择项目经理">
                                                {{editCtrl.manager}}
                                            </ui-select-match>
                                            <ui-select-choices class="ui-select-choices" repeat="element in managerOptions | filter:$select.search track by $index">
                                                {{element}}
                                            </ui-select-choices>
                                        </ui-select>
                                    </div>
                                </div>
                            </div>
                            <div class="meta-input-section">
                                <span class="meta-input-section-title">负责人类别: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-input">
                                        <ui-select ng-model="editCtrl.type" theme="bootstrap" ng-change="updateLeader()">
                                            <ui-select-match class="ui-select-match" placeholder="选择类别">
                                                {{editCtrl.type}}
                                            </ui-select-match>
                                            <ui-select-choices class="ui-select-choices" repeat="element in editCtrl.typeOptions | filter:$select.search track by $index">
                                                {{element}}
                                            </ui-select-choices>
                                        </ui-select>
                                    </div>
                                </div>
                            </div>
                            <div class="meta-input-section">
                                <span class="meta-input-section-title">负责人姓名: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">{{leaderCandidate}}</div>
                                </div>
                            </div>
                            <div class="meta-input-section">
                                <button class="btn btn-info meta-three-buttons" ng-click="openModel('lg','views/permission/modal/user.html', 'PartnerModelCtrl', {type: 'leader'})" ng-disabled="(editCtrl.type!='合伙人')">
                                    查看
                                </button>
                                <button class="btn btn-success meta-three-buttons" ng-click="openModel('sm','views/permission/modal/confirm.html', 'AssignModelCtrl', {name: editCtrl.manager, id: editCtrl.data.demand.id}, 2)">
                                    委派
                                </button>
                                <button class="btn btn-warning meta-three-buttons" style="margin-right:0;" ng-click="resetAssign()">
                                    重置
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="meta-secondary-section meta-last">
                        <div class="meta-secondary-section-header">
                            <i class="fa fa-edit"></i><span>其他操作</span>
                        </div>
                        <div class="meta-secondary-section-content">
                          <div class="meta-input-section">
                            <a ng-if="(!editCtrl.data.canceled && editCtrl.data.state!='已完成')" class="btn btn-danger meta-three-buttons" ng-click="openModel('','views/permission/modal/cancel.html', 'CloseProcessModelCtrl')">终止进程</a>
  													<a target="_blank" ng-if="editCtrl.data.demand.tags[0]!='合作'" class="btn btn-success meta-three-buttons" ui-sref="meta.permission.demand.user.detail({id: editCtrl.data.demand.id})">查看需求</a>
  													<a target="_blank" ng-if="editCtrl.data.demand.tags[0]=='合作'" class="btn btn-success meta-three-buttons" ui-sref="meta.permission.demand.cooperation.detail({id: editCtrl.data.demand.id})">查看需求</a>
  													<a target="_blank" ng-if="editCtrl.data.technology.tags[0]!='合作'" class="btn btn-success meta-three-buttons" ui-sref="meta.permission.technology.technology.detail({id: editCtrl.data.technology.id})">查看方案</a>
  													<a target="_blank" ng-if="editCtrl.data.technology.tags[0]=='合作'" class="btn btn-success meta-three-buttons" ui-sref="meta.permission.technology.solution.detail({id: editCtrl.data.technology.id})">查看方案</a>
                          </div>
                        </div>
                    </div>
                </uib-tab>
                <uib-tab heading="信息">
                    <div class="meta-secondary-section">
                        <div class="meta-secondary-section-header">
                            <i class="fa fa-calendar"></i><span>各项完成时间</span>
                        </div>
                        <div class="meta-secondary-section-content">
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">需求审核: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.demand.verifiedAt==null?'------------------------':editCtrl.data.demand.verifiedAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                            </div>
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">方案审核: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.technology.verifiedAt==null?'------------------------':editCtrl.data.technology.verifiedAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                                <div class="clear-float"></div>
                            </div>
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">联系沟通: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.demandSideProcess.checkTechnologySideAt==null?'------------------------':editCtrl.data.demandSideProcess.checkTechnologySideAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                                <div class="clear-float"></div>
                            </div>
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">邀请对接: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.technologySideProcess.agreeWithInvitingAt==null?'------------------------':editCtrl.data.technologySideProcess.agreeWithInvitingAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                                <div class="clear-float"></div>
                            </div>
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">线下对接: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.demandSideProcess.agreeWithReimbursementAt==null?'------------------------':editCtrl.data.demandSideProcess.agreeWithReimbursementAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                                <div class="clear-float"></div>
                            </div>
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">提交合同: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.demandSideProcess.signAContractAt==null?'------------------------':editCtrl.data.demandSideProcess.signAContractAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                                <div class="clear-float"></div>
                            </div>
                            <div class="meta-input-section meta-short">
                                <span class="meta-input-section-title">确认签约: </span>
                                <div class="meta-input-section-control">
                                    <div class="meta-text">
                                        {{editCtrl.data.technologySideProcess.confirmContractAt==null?'------------------------':editCtrl.data.technologySideProcess.confirmContractAt | date:"yyyy-MM-dd（hh:mm a）"}}
                                    </div>
                                </div>
                                <div class="clear-float"></div>
                            </div>
                        </div>
                    </div>
										<div class="meta-secondary-section meta-last">
                        <div class="meta-secondary-section-header">
                            <i class="fa fa-stop"></i><span>中止情况</span>
                        </div>
                        <div class="meta-secondary-section-content">
														<div class="meta-input-section meta-short">
																<span class="meta-input-section-title">终止方: </span>
																<div class="meta-input-section-control">
																		<div class="meta-text">
																				{{editCtrl.data.causeForCancel!=null?'项目经理':(editCtrl.data.demandSideProcess.causeForCancel!=null?'需求方':(editCtrl.data.technologySideProcess.causeForCancel!=null?'技术方':'技术方'))}}
																		</div>
																</div>
																<div class="clear-float"></div>
														</div>
														<div class="meta-input-section meta-short">
																<span class="meta-input-section-title">终止原因: </span>
																<div class="meta-input-section-control">
																		<div class="meta-text">
																				{{editCtrl.data.causeForCancel!=null?editCtrl.data.causeForCancel:(editCtrl.data.demandSideProcess.causeForCancel!=null?editCtrl.data.demandSideProcess.causeForCancel:(editCtrl.data.technologySideProcess.causeForCancel!=null?editCtrl.data.technologySideProcess.causeForCancel:editCtrl.data.technologySideProcess.causeForCancel))}}
																		</div>
																</div>
																<div class="clear-float"></div>
														</div>
												</div>
										</div>
                </uib-tab>
								<uib-tab heading="进程">
										<div class="tab-comment" ng-show='!controlTab' ui-view="note"></div>
								</uib-tab>
								<uib-tab heading="备注">
										<div class="tab-comment" ng-show='!controlTab' ui-view="comment"></div>
								</uib-tab>
            </uib-tabset>
        </div>
    </div>
</div>
